package gbackup.command;

import core.File;
import core.Shell;

public class LocalListCommand extends Command {

	public LocalListCommand(Shell shell, String rawCommand) {
		super(shell, rawCommand);
	}

	@Override
	public void execute() {
		java.io.File workingDirectory = this._shell.getLocalWorkingDirectory();
		for (java.io.File f : workingDirectory.listFiles()) {
			if (f.isDirectory())
				this._outputPrintStream.println(f.getName() + File.FILE_SEPERATOR);
			else
				this._outputPrintStream.println(f.getName());
		}
	}
}
